package com.orm.handler;

import java.sql.JDBCType;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class BooleanTypeHandler extends BaseTypeHandler<Boolean> {
	
	@Override
	public void setNotNullParameter(PreparedStatement ps, int i, Boolean parameter, JDBCType jdbcType) throws SQLException {
		ps.setBoolean(i, parameter);
	}
	
	@Override
	public Boolean getNullableResult(ResultSet rs, String columnName) throws SQLException {
		return rs.getBoolean(columnName);
	}
	
	@Override
	public Boolean getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
		return rs.getBoolean(columnIndex);
	}
}
